package com.yishu.shop;

import com.yishu.shop.ribbon.UserRibbonConfig2;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import ribbon.config.UserRibbonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 *
 *
 * @author zengchao
 * @date 2021-07-07 20:23:50
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@RibbonClient(name = "user-server",configuration = UserRibbonConfig2.class)
@ComponentScan(basePackages = "com.yishu.shop",
        excludeFilters = {@ComponentScan.Filter(type = FilterType.REGEX,pattern = "com.yishu.shop.ribbon.*")})
@EnableCircuitBreaker
public class ShopApplication {

    public static void main(String[] args) {
        SpringApplication.run(ShopApplication.class,args);
    }
}
